<HTML><HEAD><TITLE>listing</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Dynamic Predicates</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>listing</H1>
Outputs the definition of all dynamic predicates in the database.


<DL>
</DL>
<H2>Description</H2>
   Outputs each of the dynamic predicates currently contained on the
   database.  ie.  all predicates created using assert/1 or asserta/1 or
   compiled as dynamic predicates.

<P>
   The order in which the predicates are listed is undefined.

<P>
   The individual clauses are output in indented format using
   writeclause/2.

<P>
   No static predicates are output.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>listing is det
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H2>Examples</H2>
<PRE>
Success:
    [eclipse]: [user].
     :- dynamic x/0, y/1.
     x :- true.
     y(X) :- write(X).
     user compiled 0 bytes in 0.07 seconds
    yes.
    [eclipse]: assert(man(adam)), assert(woman(eve)),
    &gt; assert((likes(X,Y):-man(X),woman(Y))).
    X = _g102
    Y = _g98
    yes.
    [eclipse]: listing.
    x .
    y(_g68):-
            write(_g68) .
    likes(_g68, _g70):-
            man(_g68),
            woman(_g70) .
    woman(eve) .
    man(adam) .
    yes.



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/dynamic/assert-1.html">assert / 1</A>, <A HREF="../../kernel/dynamic/clause-2.html">clause / 2</A>, <A HREF="../../kernel/dynamic/listing-1.html">listing / 1</A>, <A HREF="../../kernel/ioterm/writeclause-1.html">writeclause / 1</A>
</BODY></HTML>
